import { App } from "../../App";
import { ViewId } from "../../frame/common/view/IView";
import { IModule } from "../IModule";
import { DemoViewCtrl } from "./DemoViewCtrl";
import { DemoViewCtrlMultiCtrl } from "./DemoViewMultiCtrl";



export class DemoModule implements IModule {

    private static _ins: DemoModule;
    static get ins(): DemoModule {
        if (!this._ins) {
            this._ins = new DemoModule();
        }
        return this._ins;
    }
    private constructor() {
    }

    init(): void {
        App.ins.viewMgr.register(
            DemoViewCtrl.viewConfig.id,
            new DemoViewCtrl(DemoViewCtrl.viewConfig, []),
            null
        ),
        App.ins.viewMgr.register(
            DemoViewCtrlMultiCtrl.viewConfig.id,
            new DemoViewCtrlMultiCtrl(DemoViewCtrlMultiCtrl.viewConfig, []),
            null
        )
    }
    finit(): void {

    }
    control: any;
    model: any;
    util?: any;

}
App.ins.moduleMgr.register(DemoModule.ins)